package com.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;




@RestController
public class Controller {
	
	
	@Autowired
	private Environment env;
	
    @RequestMapping(value = "/getConfig", method = RequestMethod.GET	)
	public String getConfig() {
		
		String helloStr = env.getProperty("prod.hello");
		String urlStr = env.getProperty("prod.url");
		String portStr = env.getProperty("prod.port");
		
		return helloStr + "\n" + urlStr + "\n" + portStr;
	}
}
